home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Communications / Converse / Source / TextAppend.m < prev    next >
Text File  |  1995-12-28  |  675b  |  27 lines

  1.  
  2. #import "TextAppend.h"
  3.  
  4. @implementation Text(Append)
  5.  
  6. /* appendString: - append value of a string to the end of Text. */
  7. - (void)appendString:(NSString *)aString
  8. {
  9.     [self setSel:[self textLength] :[self textLength]];
  10.     [self replaceSel:[aString cString]];
  11.     [self scrollSelToVisible];
  12. }
  13.  
  14. /* appendString: - append value of a string to the end of Text with a specific font style. */
  15. - (void)appendString:(NSString *)aString withFontStyle:(NXFontTraitMask)traits
  16. {
  17.     int originalLength = [self textLength];
  18.  
  19.     //** append text
  20.     [self appendString:aString];
  21.  
  22.     //** set font style
  23.     [self setSel:originalLength :[self textLength]];
  24.     [self setSelFontStyle:traits];
  25. }
  26.  
  27. @end